<?php
/**
 * 配置服务器文件
 * User: xbx
 * Date: 2018/3/1
 * Time: 15:43
 */
return array(

    //配置服务器配置
    'server' => array(
        "reactor_num" => CPU_NUM, //swoole_cpu_num(), // * 2,
        "worker_num" => CPU_NUM, //swoole_cpu_num(), //* 2,
        "daemonize" => false,
        'pid_file' => __DIR__.'/config.pid',
        "log_file" => __DIR__ . '/log/config.log', //daemonize=>true以后
        "log_level" => 4,
        'max_request' => 10000,
        'dispatch_mode' => 2,
        'debug_mode'=> 1,

        'package_max_length' => 4096,//8192  65535
        'open_length_check'=> true,
        'package_length_offset' => 2, //最大长度定义 #define SW_BUFFER_SIZE    65535  FFFF
        'package_body_offset' => 0,
        'package_length_type' => 'n',

        'heartbeat_check_interval' => 10,
        'heartbeat_idle_time' => 120,


        'open_tcp_keepalive'=>1,
        'tcp_keepidle'=>5,
        'tcp_keepcount'=>3,
        'tcp_keepinterval'=>5,

        'open_tcp_delay' => true,
        'md5type' => 64,
    ),

);